import { request } from '@/utils/request'

// 获取购物车
export const cartGet = () => request('Membercart/cart_list')
// 新增购物车
export const cartAdd = (goodsId, quantity, blId) =>
  request('/Membercart/cart_add', {
    bl_id: blId,
    goods_id: goodsId,
    quantity: quantity
  })
// 删除购物车
export const cartDelete = cartId =>
  request('/Membercart/cart_del', {
    cart_id: cartId
  })

// 购物车更新
export const cartUpdate = (cartId, quantity) =>
  request('/Membercart/cart_edit_quantity', {
    cart_id: cartId,
    quantity: quantity
  })

// 购物车数量
export const cartQuantity = () => request('/Membercart/cart_count')
